Telegram Group & Telegram Channel
🎓 Задача по Python #45

Описание


Напишите программу, которая проверит, что две строки являются анаграммами.

Анаграмма - слово, которые получается путем перестановки букв другого слова.

Например:

мука - > кума

Решение:

def is_anagram(string1: str, string2: str):
return sorted(string1) == sorted(string2)

print(is_anagram('night', 'thing'))
print(is_anagram('cat', 'car'))


Свой вариант решения в комментарии 💬

#задачи



tg-me.com/pythonturboru/557
Create:
Last Update:

🎓 Задача по Python #45

Описание


Напишите программу, которая проверит, что две строки являются анаграммами.

Анаграмма - слово, которые получается путем перестановки букв другого слова.

Например:

мука - > кума

Решение:

def is_anagram(string1: str, string2: str):
return sorted(string1) == sorted(string2)

print(is_anagram('night', 'thing'))
print(is_anagram('cat', 'car'))


Свой вариант решения в комментарии 💬

#задачи

BY Python Turbo. Уютное сообщество Python разработчиков.




Share with your friend now:
tg-me.com/pythonturboru/557

View MORE
Open in Telegram


Python Turbo Уютное сообщество Python разработчиков Telegram | DID YOU KNOW?

Date: |

What is Secret Chats of Telegram

Secret Chats are one of the service’s additional security features; it allows messages to be sent with client-to-client encryption. This setup means that, unlike regular messages, these secret messages can only be accessed from the device’s that initiated and accepted the chat. Additionally, Telegram notes that secret chats leave no trace on the company’s services and offer a self-destruct timer.

Python Turbo Уютное сообщество Python разработчиков from fr


Telegram Python Turbo. Уютное сообщество Python разработчиков.
FROM USA